Finally working, tested with just one medicine