working version. lots of harcodes though