I think this is almost close to how it should work