refactored alot to make something work..